  <!-- {if $member_from eq 'seller'}-->
		{include file=member.header.html}
        <!--{else}-->
       {include file=buyer.header.html}
  <!--{/if}-->
<!-- 内容 -->
<div class="content f-cb"> 
  
  <!-- 当前位置 --> 
  {include file=path.html} 
  <!-- 内容左边栏 --> 
   <!-- {if $member_from eq 'seller'}-->
		{include file=member.menu.html}
        <!--{else}-->
        {include file=member.menu.buyer.html}
        <!--{/if}-->
  <!-- 内容右边栏 -->
  <script>
  $(function(){
      $("form.addbank").validate({
            errorPlacement: function(error, element) { 
                  error.appendTo( element.parent());
            },
            rules: {
              sendType:{
                required:true
              },
              cash_amount: {
                required: true,
                isZNum:true,
				 remote : {                //唯一
              url :'index.php?app=paycenter&act=ajaxCheckAmount',
              type:'get',
              data:{
                  cash_amount : function(){
                      return $('#cash_amount').val();
                      }
                
               }
            }
                }
            },
            messages: {
              sendType:{
                required:"请选择银行"
              },
             cash_amount: {
                 required: "金额不能为空",
				     remote   : '提现金额不能大于可用金额'
              }
            }
      });
  });
  </script>
  <div class="con-extract-title">提取可用金额到银行卡</div>
  <div class="con-extract-r">
    <dl class="extract-template">
      <dd>
        <div class="extract-title">
          <table width="100%" border="0">
            <tr>
              <td align="left">账户名：{$user.user_name}</td>
              <td align="right">账户金额：<i>{$total_money}</i>元</td>
              <td align="right">可用金额：<i>{$usermoney_info.user_money}</i>元</td>
              <td align="right">冻结金额：<i>{$usermoney_info.frozen_money}</i>元</td>
              <td align="right"><a href="index.php?app=paycenter&act=cash_log&from={$member_from}">提现纪录</a></td>
            </tr>
          </table>
        </div>
      
        <!-- {if $bank_list} -->
          <div class="extract-point">
						提现到账时间：提现金额将次日到账，节假日顺延。每天最多可提现3次，最高每日提现总金额500元。（买家和卖家提现提醒不同及待定）
					</div>
        <form action="index.php?app=paycenter&act=cash_submit&from={$member_from}" method="post" class="addbank" name="addbank">
          <table width="100%" >
            <tr>
              <td align="left" width="670"><table width="100%" border="0" class="choosebank">
                  <tr>
                    <td width="110" valign="top" align="left"><div style="height:50px; line-height:50px; padding-left:10px;">请选择银行：</div></td>
                    <td>
                    <ul>
                         <!-- 循环开始 --> 
              <!--{foreach from=$bank_list item=bank}-->
                        <li class="f-cb">
                          <div class="f-fl <!--{ if $bank.is_default eq 1}-->active<!--{/if}-->">
                            <input type="radio" name="sendType" value="{$bank.bank_id}" <!--{ if $bank.is_default eq 1}-->checked="checked"<!--{/if}--> />
                            &nbsp;<img src="{res file=images/member/}{$bank.bank_name}.gif" align="absmiddle" /> &nbsp; <span>借记卡&nbsp; {$bank.bank_account}</span> </div>
                          <dl onmouseover="wl.cashWrap(this)" onmouseout="wl.cashWrap(this)">
                            <dt> <a >管理</a> </dt>
                            <dd> <a onclick="wl.cashDefault(this)">设为默认</a> <a onclick="wl.cashDel(this)" id="{$bank.bank_id}">删除</a> </dd>
                          </dl>
                        </li>
                        <!--{/foreach}--> 
                      </ul>
                      </td>
                  </tr>
                </table></td>
              <td valign="top" ><div class="add_bankclip"> <a href="index.php?app=paycenter&act=addbank&from={$member_from}"> <img src="{res file=images/member/add.gif}" alt="添加银行卡" align="absmiddle"  /> &nbsp;&nbsp;添加银行卡 </a> </div></td>
            </tr>
          </table>
          <table width="100%">
            <tr>
              <td align="right" width="80">提现金额：</td>
              <td ><div class="valid-d">
                  <input type="text"  class="extract-t-ia b-radius" name="cash_amount" id="cash_amount" value="" />
                  &nbsp;&nbsp;元 </div></td>
            </tr>
          </table>
          <div class="extract-panes">
            <input type="submit" class="b-radius keep" value="申请提现" />
          </div>
        </form>
        <!-- {else} -->
        <form action="" method="post" class="">
          <div class="add_bank"> 请选择银行：&nbsp;&nbsp; <a id="extract-temp-aa" href="index.php?app=paycenter&act=addbank&from={$member_from}">添加银行卡</a> </div>
          <div class="extract-panes">
            <table>
              <tr>
                <td><input type="submit" class="b-radius disabled" value="申请提现" disabled="disabled"/></td>
                <td>添加银行卡后即可申请提现</td>
              </tr>
            </table>
          </div>
        </form>
        
        <!-- {/if} --> 
      </dd>
    </dl>
  </div>
</div>

<!-- 页脚 --> 
{include file=footer.html}